package com.qfedu.yanglao20admin.plancase.controller;

import com.qfedu.yanglao20.common.CommonResult;
import com.qfedu.yanglao20.common.annotation.LogInfo;
import com.qfedu.yanglao20admin.plancase.service.CaseOperateService;
import com.qfedu.yanglao20admin.plancase.vo.CaseOperateVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author yujie
 * @data 2023/4/25 19:43
 */
@Api(tags = "预案列表操作记录")
@RestController
@RequestMapping("/operate")
public class CaseOperateController {

    @Resource
    private CaseOperateService caseOperateService;

    @LogInfo
    @ApiOperation(value = "操作记录信息", notes = "操作记录信息")
    @GetMapping("/list")
    public CommonResult<CaseOperateVO> page(@RequestParam @ApiParam("预案类型id") Integer listId) {
        List<CaseOperateVO> caseOperates =
                caseOperateService.listCaseOperate(listId);
        return CommonResult.success(caseOperates);
    }
}
